<!--
  +++++++++++++++++++++++++++++++++++++++++++
  +  Description: 查看 操作日志记录
  +  Created by 王大宸 on 2020-02-23 17:17:28
  +  Created with IntelliJ IDEA.
  +++++++++++++++++++++++++++++++++++++++++++
  -->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="common/common::common('查看操作日志记录')"/>
<link rel="stylesheet" href="/static/home/jsonview/jquery.jsonview.css">
<script type="text/javascript" src="/static/home/jsonview/jquery.jsonview.js"></script>
<script>
    $(function () {
        layui.use(['form'], function () {
             form = layui.form;
            form.render();
        });
    });
</script>
    <style>
        .layui-form-body{
            height: 603px;
            overflow-y:auto;
            margin-right: 0px;
            padding-right: 15px;
        }
        html{
            overflow: hidden;
        }
    </style>
</head>
<body>

<form class="layui-form" id="seeOperLogForm" th:object="${baseOperLog}">
    <div class="layui-form-body" style="margin-bottom: 80px;">
        <div class="layui-form-item">
            <label class="layui-form-label">模块标题</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{title}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">业务类型</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{businessType}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作状态</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{status}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">方法名称</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{method}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">请求方式</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{requestMethod}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作人员</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{createUser}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">请求URL</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{operUrl}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">主机地址</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{operIp}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作地点</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{operLocation}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item" style="margin-bottom: 10px">
            <label class="layui-form-label">操作时间</label>
            <div class="layui-input-block">
                <input type="text" th:value="${time}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">返回消息</label>
            <div class="layui-input-block">
                <input type="text" th:field="*{errorMsg}"
                       class="layui-input" readonly="readonly">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">请求参数</label>
            <div class="layui-input-block">
                <pre class="layui-code" id="operParam">
                </pre>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">返回参数</label>
            <div class="layui-input-block">
                <pre class="layui-code" id="jsonResult">
                </pre>
            </div>
        </div>

    </div>
</form>

<script th:inline="javascript">
    $(function () {
        let operParam = [[${baseOperLog.operParam}]];
        if ($.string.isNotEmpty(operParam) && operParam.length < 2000) {
            $("#operParam").JSONView(operParam);
        } else {
            $("#operParam").text(operParam);
        }
        let jsonResult = [[${baseOperLog.jsonResult}]];
        if ($.string.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
            $("#jsonResult").JSONView(jsonResult);
        } else {
            $("#jsonResult").text(jsonResult);
        }
    });
</script>

</body>
</html>